package com.heo.pojo;

import com.heo.util.ByteHelper;

public class ChargingInfoEntity  extends BaseEntity{

	private static final long serialVersionUID = 1L;
	private int passageway;
	private int payType;
	private int chargingStatus;//充电状态  1 开始充电上传；2 结束充电上传；3 终端停电上传；4 充电过程实时上传
	private String batch;
	private String areaCode; //
	private String startCard;
	private String endCard;//
	private String startCardStr;//终端硬件版本号
	private String endCardStr;//终端固件版本号
	
	public ChargingInfoEntity(String bodyHex) {
		passageway = ByteHelper.hex16ToInt(bodyHex.substring(0, 2));
		payType = ByteHelper.hex16ToInt(bodyHex.substring(2, 4));
		chargingStatus = ByteHelper.hex16ToInt(bodyHex.substring(4, 6));
		batch = bodyHex.substring(6, 14);
		areaCode = bodyHex.substring(14, 18);
		startCard = bodyHex.substring(18, 26);
		endCard = bodyHex.substring(26, 34);
		startCardStr = bodyHex.substring(34, 36);
		endCardStr = bodyHex.substring(36, 38);
	}

	public int getPayType() {
		return payType;
	}

	public void setPayType(int payType) {
		this.payType = payType;
	}

	public int getChargingStatus() {
		return chargingStatus;
	}

	public void setChargingStatus(int chargingStatus) {
		this.chargingStatus = chargingStatus;
	}

	public String getBatch() {
		return batch;
	}

	public void setBatch(String batch) {
		this.batch = batch;
	}

	public String getAreaCode() {
		return areaCode;
	}

	public void setAreaCode(String areaCode) {
		this.areaCode = areaCode;
	}

	public String getStartCard() {
		return startCard;
	}

	public void setStartCard(String startCard) {
		this.startCard = startCard;
	}

	public String getEndCard() {
		return endCard;
	}

	public void setEndCard(String endCard) {
		this.endCard = endCard;
	}

	public String getStartCardStr() {
		return startCardStr;
	}

	public void setStartCardStr(String startCardStr) {
		this.startCardStr = startCardStr;
	}

	public String getEndCardStr() {
		return endCardStr;
	}

	public void setEndCardStr(String endCardStr) {
		this.endCardStr = endCardStr;
	}

	public int getPassageway() {
		return passageway;
	}

	public void setPassageway(int passageway) {
		this.passageway = passageway;
	}
}
